package com.lingyun.generator.utils;

import org.apache.commons.lang.StringUtils;

/**
 * Created by huyaowu on 2016/12/2.
 */
public class DecodeUtil {
    //解码
    public static String decode(String in) {
        in = StringUtils.isBlank(in) ? "" : in;
        String out = "";
        try {
            String paramsTrans = new String(in.getBytes("ISO-8859-1"), "UTF-8");
            out = java.net.URLDecoder.decode(paramsTrans, "UTF-8");
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            return out;
        }
    }
}
